package com.geostart.constructionland.system.service;

import com.geostar.constructionland.common.entity.response.ExtJsAjaxResponse;
import com.geostar.constructionland.common.entity.statistics.UnifiedDataQueryConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "constructionland-statistics")
public interface DataQueryConfigFeignClient {

    @RequestMapping(value = "/statistics/list", method = RequestMethod.POST)
    ExtJsAjaxResponse udqList(@RequestParam(value = "page") int pageNo, @RequestParam(value = "limit") int pageNum, @RequestParam(value="query_param_statistics_id",required=false)String query_param_statistics_id);

    @RequestMapping(value = "/statistics/delete", method = RequestMethod.POST)
    ExtJsAjaxResponse udqDelete(@RequestParam("id") String id);

    @RequestMapping(value = "/statistics/add", method = RequestMethod.POST, consumes = "application/json")
    ExtJsAjaxResponse udqAdd(@RequestBody UnifiedDataQueryConfig dataQueryConfig);

    @RequestMapping(value = "/statistics/update", method = RequestMethod.POST, consumes = "application/json")
    ExtJsAjaxResponse udqUpdate(@RequestBody UnifiedDataQueryConfig dataQueryConfig);

    @RequestMapping(value = "/statistics/query", method = RequestMethod.POST, consumes = "application/json")
    ExtJsAjaxResponse udqQuery(@RequestParam("uniqueQueryId") String uniqueQueryId, @RequestParam("params") String params);
}
